from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By

test=webdriver.Chrome()
test.get("https://www.baidu.com/")
a=test.find_element(By.CSS_SELECTOR,"input[id='kw']")
a.send_keys("疫情")
sleep(4)
print(a.get_attribute("type"))
a.screenshot("\test.png")

test.find_element(By.CSS_SELECTOR,"#su").click()

sleep(3)
test.quit()